Skip to content

probe: windows mapped-file delete semantics (throwaway) - #579

Closed
wan9chi wants to merge 3 commits into
mainfrom
probe/windows-mapped-delete
Closed

probe: windows mapped-file delete semantics (throwaway)#579
wan9chi wants to merge 3 commits into
mainfrom
probe/windows-mapped-delete

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 30, 2026

Copy link
Copy Markdown
Member

Throwaway probe for a design question on #576: whether manual name removal of a live-mapped, handle-free file works on modern Windows. Will be closed without merging.

🤖 Generated with Claude Code

wan9chi and others added 2 commits July 30, 2026 09:54
…orms

Codex CLI's and Claude Code's default sandboxes deny the primitives fspy's
Unix shared memory was built on: the macOS Seatbelt profile denies
`shm_open` (`ipc-posix-shm-write-create`), and both sandboxes block
Unix-domain sockets, which the Linux memfd broker depended on. Plain files
in the temp directory are writable under both.

Replace all three backends with one file-backed implementation attached by
path: a sparse temporary file plus `memmap2`, with the file's absolute path
as the identifier. No broker, no tokio requirement, no global object names.

Lifetime semantics converge too: dropping the owner makes the name
disappear and later opens fail, while existing views stay usable — now on
Windows as well, where closing the delete-on-close handle applies the delete
disposition even while other processes hold views.

Refs #563.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Throwaway. Never merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  -1.76%  [-12.65% .. +11.29%]  overhead   +52.58%
dynamic/access             change  -1.01%  [ -1.94% ..  -0.28%]  overhead   +52.26%
static/launch              change  +4.32%  [ -9.04% .. +20.81%]  overhead  +154.16%
static/access              change  -1.80%  [ -7.52% ..  +4.24%]  overhead  +845.26%

macos

dynamic/launch             change  +1.61%  [ -2.67% ..  +6.88%]  overhead  +227.12%
dynamic/access             change  -0.60%  [-11.61% .. +10.54%]  overhead   +22.00%

windows

dynamic/launch             change  -0.36%  [ -7.50% ..  +6.87%]  overhead   +28.64%
dynamic/access             change  +0.35%  [ -0.85% ..  +1.69%]  overhead    +8.99%

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wan9chi

wan9chi commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Probe done. Results: modern Windows removes a mapped file's name via remove_file even with live views and open share-delete handles; views and handles keep working. Design follows in #576.

@wan9chi wan9chi closed this Jul 30, 2026
@wan9chi
wan9chi deleted the probe/windows-mapped-delete branch July 30, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant